<template>
  <div>
    <h2 class="font18 color-1e88e5 mb-10 mt-30">{{ title }}</h2>
    <el-table :data="list" border fit highlight-current-row style="width: 100%">
      <el-table-column align="center" label="编号" width="100">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" label="产品名">
        <template slot-scope="scope">
          <span>{{ scope.row.productName }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="产品编号">
        <template slot-scope="scope">
          <span>{{ scope.row.productSn }}</span>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="类型">
        <template slot-scope="scope">
          <span>{{ scope.row.productType }}</span>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="生产企业">
        <template slot-scope="scope">
          <span>{{ scope.row.productMan }}</span>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="规格型号">
        <template slot-scope="scope">
          <span>{{ scope.row.productSpe }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="保修时间(月)">
        <template slot-scope="scope">
          <span>{{ scope.row.warrantyMonth }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="交货期（天）">
        <template slot-scope="scope">
          <span>{{ scope.row.deliveryDay }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="采购单价（元）">
        <template slot-scope="scope">
          <span>{{ scope.row.purchasePrePrice }}</span>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="数量">
        <template slot-scope="scope">
          <span>{{ scope.row.purchaseAmt }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="单位">
        <template slot-scope="scope">
          <span>{{ scope.row.purchaseUnit }}</span>
        </template>
      </el-table-column>
      <el-table-column width="120px" align="center" label="总金额">
        <template slot-scope="scope">
          <span>{{ scope.row.purchaseTotalAmt }}</span>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="技术参数">
        <template slot-scope="scope">
          <a v-if="scope.row.cmDetailedListAttachmentSimpleVos" :href = "GLOBAL.fileUrl + scope.row.cmDetailedListAttachmentSimpleVos[0].fileUrl" target="_blank" ><span class="complete-span">查看</span></a>
        </template>
      </el-table-column>
      <el-table-column width="100px" align="center" label="配置清单">
        <template slot-scope="scope">
          <a v-if="scope.row.cmDetailedListAttachmentSimpleVos" :href = "GLOBAL.fileUrl+scope.row.cmDetailedListAttachmentSimpleVos[1].fileUrl" target="_blank" ><span class="complete-span">查看</span></a>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'ShoppingList',
  props: {
    title: {
      type: String,
      default: ''
    },
    list: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>

</style>
